//
//  PhotoAlbumViewCell.m
//  Logistics
//
//  Created by 刘峰 on 2017/12/11.
//  Copyright © 2017年 com.Logistics. All rights reserved.
//

#import "PhotoAlbumViewCell.h"

@interface PhotoAlbumViewCell ()


@property (weak, nonatomic) IBOutlet UIImageView *frontImageView;
@property (weak, nonatomic) IBOutlet UIImageView *middleImageView;
@property (weak, nonatomic) IBOutlet UIImageView *backImageView;

@property (weak, nonatomic) IBOutlet UILabel *albumtitle;
@property (weak, nonatomic) IBOutlet UILabel *albumcount;

@end

@implementation PhotoAlbumViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}


- (void)setObject:(BrowserObject *)object {
    for (int i = 0; i < object.images.count; i++) {
        switch (i) {
            case 0:
                _frontImageView.image  = object.images.firstObject;
                break;
                
            case 1:
                _middleImageView.image = object.images[1];
                break;
                
            default:
                _backImageView.image   = object.images.lastObject;
                break;
        }
    }
    
    _albumtitle.text = object.albumtitle;
    _albumcount.text = [NSString stringWithFormat:@"%ld",object.albumcount];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
